//
//  CorePickerView.h
//  mobile
//
//  Created by abc on 2018/1/31.
//  Copyright © 2018年 azazie. All rights reserved.
//

#import <UIKit/UIKit.h>

#define kDatePicHeight 200
#define kTopViewHeight 44

#define SCREEN_BOUNDS [UIScreen mainScreen].bounds

typedef void(^ClearBlock)(void);
typedef void(^DismissBlock)(void);
typedef void(^ResultBlock)(NSString *selectValue);

@interface CorePickerView : UIView

// 背景视图
@property (nonatomic, strong) UIView *backgroundView;
// 弹出视图
@property (nonatomic, strong) UIView *alertView;
// 顶部视图
@property (nonatomic, strong) UIView *topView;
// 左边取消按钮
@property (nonatomic, strong) UIButton *leftBtn;
// 右边确定按钮
@property (nonatomic, strong) UIButton *rightBtn;
// 中间标题
@property (nonatomic, strong) UILabel *titleLabel;
// 分割线视图
@property (nonatomic, strong) UIView *lineView;

@property (nonatomic, strong) ClearBlock clearBlock;

@property (nonatomic, strong) ResultBlock resultBlock;

@property (nonatomic, strong) DismissBlock dismissBlock;

/** 初始化子视图 */
- (void)initUI;

/** 点击背景遮罩图层事件 */
- (void)didTapBackgroundView:(UITapGestureRecognizer *)sender;

/** 取消按钮的点击事件 */
- (void)clickLeftBtn;

/** 确定按钮的点击事件 */
- (void)clickRightBtn;

/** 视图展示**/
- (void)showWithAnimation:(BOOL)animation;

/** 视图隐藏**/
- (void)dismissWithAnimation:(BOOL)animation;

@end
